package com.zlx.mall.basic.authentication.enums;

import lombok.Getter;

/**
 * @Author xiatian
 * @Date 2024/5/25 星期六 15:33
 * @注释
 */
@Getter
public enum ExceptionEnum {

    AUTHENTICATION_EXCEPTION(1000, "认证异常"),
    AUTHENTICATION_EXCEPTION_LOGIN_FAILED(1001, "登录失败"),
    AUTHENTICATION_EXCEPTION_LOGIN_FAILED_TOO_MANY_TIMES(1002, "登录失败次数过多"),
    AUTHENTICATION_EXCEPTION_LOGIN_FAILED_TOO_MANY_TIMES_WAIT_TIME(1003, "登录失败次数过多，请稍后再试"),
    AUTHENTICATION_EXCEPTION_LOGIN_FAILED_TOO_MANY_TIMES_WAIT_TIME_REMAIN(1004, "登录失败次数过多，请稍后再试，剩余时间：{}"),
    AUTHENTICATION_EXCEPTION_LOGIN_FAILED_TOO_MANY_TIMES_WAIT_TIME_REMAIN_SECONDS(1005, "登录失败次数过多，请稍后再试，剩余时间：{}秒"),
    AUTHENTICATION_EXCEPTION_LOGIN_FAILED_TOO_MANY_TIMES_WAIT_TIME_REMAIN_MINUTES(1006, "登录失败次数过多，请稍后再试，剩余时间：{}分钟");


    private Integer code;
    private String message;
    /**
     * 构造方法
     * @param code
     * @param message
     */
    private ExceptionEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    @Override
    public String toString() {
        return "Code: " + code + ", Message: " + message;
    }




}
